<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<script type="text/javascript">
    function cart_read(cookieName){
        var search = cookieName + "=";
        if (document.cookie.length > 0) {
            offset = document.cookie.indexOf(search);
            if (offset != -1) {
                offset += search.length;
                end = document.cookie.indexOf(";", offset);
                if (end == -1){
                    end = document.cookie.length;
                    return unescape(document.cookie.substring(offset, end));
                }
            }else{
                return false;
            }
        }else{
            return false;
        }
    }
    var the_list =unescape(cart_read('petInfo'));
    var totals;
    var broken_list = the_list.split("|");
    for (i=1;i<broken_list.length;i++){
        var single_list=broken_list[i];
        var broken_single_list = single_list.split("&");
        var subtotals=broken_single_list[2]*(broken_single_list[3]*100)/100;
        if (totals==null){
            totals=subtotals;
        }else{
            totals=totals*100+subtotals*100;
            totals=totals/100;
        }
        document.write("<table id='Table"+broken_single_list[0]+"' width='30%' border='1' cellspacing='0' cellpadding='0' bordercolor='#FFFFFF' bordercolordark='#FFFFFF' bordercolorlight='#FB9914' class='td_cart'>")
        document.write("<tr>");
        document.write("<td width='46%'>"+broken_single_list[1]+"</td>");
        document.write("<td width='14%'>"+broken_single_list[3]+"</td>");
        document.write("<td width='12%'>"+broken_single_list[2]+"</td>");
        document.write("<td width='20%'><input type='text' size='10' id='id"+broken_single_list[0]+"'style='border:medium none; '  readonly value="+subtotals+"></td>");
        document.write("</tr></table>");
    }
</script>


</body>
</html>